package com.xigua.JucOfBeautiful.chapterOne.interrup1_7;

/**
 * @author LiRongHua
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2022/1/2315:22
 */
public class InterrupTest2 {
    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(()->{
            while (true){

            }
        });

        thread.start();
        thread.interrupt();
        System.out.println("isInterrupted:"+thread.isInterrupted());
        System.out.println("isInterrupted:"+thread.interrupted());
        System.out.println("isInterrupted:"+Thread.interrupted());
        System.out.println("isInterrupted:"+thread.isInterrupted());
        thread.join();
        System.out.println("main thread is over");

    }

}
